package com.du.springmvc.bean;

import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.format.annotation.NumberFormat;

import java.time.LocalDate;


/**
 * @author : DuJiabao
 * @Project : spring-mvc
 * @Time : 2021/4/6 18:05
 * @Desc :
 */
public class Person {
  @DateTimeFormat(pattern = "yyyy-MM-dd")
  LocalDate birthday;
  @NumberFormat(pattern = "###,###.##")
  Double salary;

  public Person() {
  }

  public Person(LocalDate birthday, Double salary) {
    this.birthday = birthday;
    this.salary = salary;
  }

  public LocalDate getBirthday() {
    return birthday;
  }

  public void setBirthday(LocalDate birthday) {
    this.birthday = birthday;
  }

  public Double getSalary() {
    return salary;
  }

  public void setSalary(Double salary) {
    this.salary = salary;
  }

  @Override
  public String toString() {
    return "Person{" +
            "birthday=" + birthday +
            ", salary=" + salary +
            '}';
  }
}
